package com.xg.sys.vo;

import com.xg.frame.validate.group.AddGroup;
import com.xg.frame.validate.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author tzt
 */
@Getter
@Setter
@ToString
@ApiModel(value = "SysDictionaryVO对象", description = "数据字典交互实体")
public class SysDictionaryVO {

    @NotNull(groups = {UpdateGroup.class})
    @ApiModelProperty(value = "主键")
    private Long id;

    @NotBlank(groups = {UpdateGroup.class, AddGroup.class})
    @ApiModelProperty(value = "类型编码")
    private String classCode;


    @NotBlank(groups = {UpdateGroup.class, AddGroup.class})
    @ApiModelProperty(value = "类型名称")
    private String className;

    @NotBlank(groups = {UpdateGroup.class, AddGroup.class})
    @ApiModelProperty(value = "键值")
    private String dataCode;

    @NotBlank(groups = {UpdateGroup.class, AddGroup.class})
    @ApiModelProperty(value = "名称")
    private String dataName;

    @NotBlank(groups = {UpdateGroup.class, AddGroup.class})
    @ApiModelProperty(value = "排序")
    private String dataOrder;

    @ApiModelProperty(value = "备注")
    private String remark;

    @Pattern(groups = {UpdateGroup.class, AddGroup.class}, regexp = "100101|100102", message = "{form.fixed.value}")
    @ApiModelProperty(value = "状态")
    private String status;

    @NotNull(groups = UpdateGroup.class)
    @ApiModelProperty(value = "版本")
    private Integer version;
}
